#include "dev_e53_motor.h"
#include "main.h"



#if defined (E53_IA1)
extern TIM_HandleTypeDef htim16;
#endif

void motor_dev_init(void)
{
    #if defined (E53_IA1)
		HAL_TIM_PWM_Stop(&htim16, TIM_CHANNEL_1);
    #endif
}

void motor_dev_control(uint8_t status)
{
    #if defined (E53_IA1)

    switch(status)
    {
        case 0:
            HAL_TIM_PWM_Stop(&htim16, TIM_CHANNEL_1);
            break ;

        case 1:
            HAL_TIM_PWM_Start(&htim16, TIM_CHANNEL_1);
            break ;

        default:
            break ;
    }

    #endif
}

e53_motor_dev motor_dev =
{
    .e53_motor_init	=	motor_dev_init,
    .e53_motor_cotr	=	motor_dev_control,
};


